package com.xy.tool.minio.util;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.io.InputStream;

/**
 * @author Greekn Zhang
 * @date 2021/8/19 17:27
 * @description
 */
@Component
public class LedgerTemplateUtils {
    @Autowired
    private MinioUtil minioUtil;

    public InputStream getUrl(String path) {
        try {
            return minioUtil.getObject(MinioUtil.templateBucket, path);
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }
}
